From 4c8c6c25f79b2f6cf2e0551a5d5013a2428b4e57 Mon Sep 17 00:00:00 2001 From: GNU Libc Maintainers Date: Fri, 14 Oct 2022 20:35:00 +0100 Subject: [PATCH] local-require-bmi-in-avx2-ifunc This patch is extracted from upstream commit 83c5b368226c ("x86-64: Require This patch is extracted from upstream commit 83c5b368226c ("x86-64: Require BMI2 for strchr-avx2.S"). It changes the common ifunc AVX2 selector to require the BMI2 instructions, and the backported fixes for memchr and strlen rely on that change. Gbp-Pq: Topic amd64 Gbp-Pq: Name local-require-bmi-in-avx2-ifunc.diff --- sysdeps/x86_64/multiarch/ifunc-avx2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/x86_64/multiarch/ifunc-avx2.h b/sysdeps/x86_64/multiarch/ifunc-avx2.h index 74189b6aa..925e5b61e 100644 --- a/sysdeps/x86_64/multiarch/ifunc-avx2.h +++ b/sysdeps/x86_64/multiarch/ifunc-avx2.h @@ -30,11 +30,11 @@ IFUNC_SELECTOR (void) const struct cpu_features* cpu_features = __get_cpu_features (); if (CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable) + && CPU_FEATURES_CPU_P (cpu_features, BMI2) && CPU_FEATURES_ARCH_P (cpu_features, AVX_Fast_Unaligned_Load)) { if (CPU_FEATURES_ARCH_P (cpu_features, AVX512VL_Usable) - && CPU_FEATURES_ARCH_P (cpu_features, AVX512BW_Usable) - && CPU_FEATURES_CPU_P (cpu_features, BMI2)) + && CPU_FEATURES_ARCH_P (cpu_features, AVX512BW_Usable)) return OPTIMIZE (evex); if (CPU_FEATURES_CPU_P (cpu_features, RTM)) -- 2.30.2